package com.hh.erp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hh.erp.entity.SysRole;
import com.hh.erp.entity.SysUser;
import com.hh.erp.mapper.SysRoleMapper;
import com.hh.erp.service.SysRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色信息表 服务实现类
 * </p>
 *
 * @author zhb
 * @since 2024-03-31
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    @Override
    public List<SysRole> selectRoleAll() {
        return this.baseMapper.selectList(new QueryWrapper<SysRole>());
    }

    @Override
    public List<SysRole> selectRoleByUserId(Long userId) {
        return this.baseMapper.selectRoleByUserId(userId);
    }
}
